<!DOCTYPE html>
<html >
<head>
    <meta charset="UTF-8">
    <title>行程</title>
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">

    <link rel="stylesheet" href="/sunfc/css/weui.css">
    <link rel="stylesheet" href="/sunfc/css/jquery-weui.css">
    <link rel="stylesheet" href="/sunfc/css/style.css">

    <style type="text/css">

    </style>
</head>
<body class="back1">
<div class="shineiSF">
    <div class="index-top">
        <div class="index-back" onClick="javascript:history.back(-1);">
            <img src="/sunfc/images/back.png" width="15">
        </div>
        <p class="index-title">行程</p>
    </div>
</div>
//eword-终点的名称/ epointx=终点的经度/ epointy=终点的纬度/ sword=起点的名称，默认是“我的位置”/ spointx=起点的经度，默认是当前定位的经度/ spointy=起点的纬度，默认是当前定位的纬度
<iframe id="tx_map" src="http://apis.map.qq.com/tools/routeplan/eword=五一文化广场&epointx=33.618493&epointy=114.649993&sword=周口师范学院&spointx=33.635975&spointy=114.68304&zoombutton=0&trafficbutton=0&topbar=0&footdetail=0?referer=myapp&key=OB4BZ-D4W3U-B7VVO-4PJWW-6TKDJ-WPB77&zoombutton=0" style="border:0;position: absolute;width: 100%;height: 60%;top:0;right:0;overflow: hidden;"></iframe>
<div style="position: absolute;z-index: 1;width: 100%;height: 60%;top:0;right:0;"></div>

<!--<div style="position: absolute;width: 100%;height: 100%;top:0;right:0;overflow: hidden">-->
<!--<img src="/sunfc/images/map.jpg" style="position: absolute;top:0;left: 0;">-->
<!--</div>-->
<div style="position: fixed;bottom:0;right:0;width: 100%;">
    <div class="index-box index-xingchengz">
        <div class="weui-cells">
            <div class="weui-cell left0">
                <div class="weui-cell__hd">
                    <div class="touxiang">
                        <img class="t-photo" src="{$trip_data['headimgurl']}" width="60" height="60">
                        {if  condition="($trip_data['sex']) eq 2"}
                        <img class="t-icon" src="/sunfc/images/sex2.png" width="15">
                        {else /}
                        <img class="t-icon" src="/sunfc/images/sex1.png" width="15">
                        {/if}
                    </div>
                </div>
                <div class="weui-cell__bd pos-tel">
                    <p class="f17">{$trip_data['nickname']}</p>
                    <p class="xcz-chexing">
                        <span class="xinren">信任值{$trip_data['trust_rank']}分</span>
                        <span>{$trip_data['car_info']}</span>
                    </p>
                    <div class="pos-tel-abs"><a href="tel:{$trip_data['tel']}"><img src="/sunfc/images/tel.png" width="30"></a></div>
                </div>
            </div>
            <div class="weui-cell left0">

                <div class="weui-cell__bd xingchengz">

                    <div class="weui-cells">
                        <div class="weui-cell">
                            <div class="weui-cell__hd">
                                <img src="/sunfc/images/wait.png" width="8" class="wait">
                            </div>
                            <div class="weui-cell__bd">
                                <p>
                                    <span>{$trip_data['create_time']}</span>
                                    <span class="font1">{$trip_data['number']}坐</span>
                                    <!--<span class="font2">95%顺路</span>-->
                                </p>
                            </div>
                        </div>
                        <div class="weui-cell">
                            <div class="weui-cell__hd">
                                <span class="dian"></span>
                            </div>
                            <div class="weui-cell__bd">
                                <p>
                                    <span>{$trip_data['begin_place']}</span>
                                    <span class="font1">{$trip_data['begin_detail']}</span>
                                </p>
                            </div>
                        </div>
                        <div class="weui-cell">
                            <div class="weui-cell__hd">
                                <span class="dian2"></span>
                            </div>
                            <div class="weui-cell__bd">
                                <p>
                                    <span>{$trip_data['end_place']}</span>
                                    <span class="font1">{$trip_data['end_detail']}</span>
                                </p>
                            </div>
                        </div>
                    </div>

                </div>
            </div>
            <div class="weui-cell left0">
                <div class="weui-cell__bd">
                    <p class="xingchengz-tel">
                        {if condition="$trip_data['status'] eq 0"}
                        <a href="javascript:;" onclick="cancle({$trip_data['id']})" class="telephone" style="padding:3px 60px;background: #4b4c5e;color:#fff;border-radius: 3px;font-size: 15px;float:left;"> 取消</a>
                        <a href="javascript:;" onclick="up_car({$trip_data['id']})" class="telephone" style="padding:3px 60px;background: #4b4c5e;color:#fff;border-radius: 3px;font-size: 15px;">上车 </a>
                        {else /}
                        <a href="javascript:;" onclick="down_car({$trip_data['id']})" class="telephone" style="padding:3px 40px;background: #4b4c5e;color:#fff;border-radius: 3px;font-size: 15px;">下车</a>
                        {/if}
                        <!--<span class="f12">车主与你顺路，你可以主动预约他</span>-->
                    </p>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="/sunfc/js/jquery.min.js"></script>
<script src="/sunfc/js/jquery-weui.min.js"></script>
<script>
    function cancle(id){
        $.confirm("您确定取消预约吗?", "取消预约", function() {
            //确定操作
            $.get("{:url('sunfc.passenger/cancel_ordering')}?"+"order_id="+id,function(data){
                if(data==1){
                    $.toast("取消成功!");
                    window.location.href="{:url('index')}";
                }else{
                    $.toast("取消失败!");
                }
            });
        }, function() {
            //取消操作
        });
    }
    function up_car(id){
        $.toast(id);
        /* $.confirm("您确定要预约吗?", "确认预约?", function() {
             //确定操作
             $.get("{:url('sunfc.passenger/up_car')}?"+"order_id="+id,function(data){
                 $.toast(data);
                 /!*if(data==-2){
                     $.toast("有正在进行的订单!");
                 }else if(data!=0){
                     $.toast("已预约!");
                     window.location.href="{:url('index')}?"+"order_id="+data;
                 }else{
                     $.toast("预约失败!");
                 }*!/
             });
         }, function() {
             //取消操作
         });*/
    }
    function down_car(id){
        $.confirm("您确定要下车吗?", "确认下车?", function() {
            //确定操作
            $.get("{:url('sunfc.passenger/down_car')}?"+"order_id="+id,function(data){
                if(data==1){
                    $.toast("下车成功");
                    window.location.href="{:url('index')}";
                }else{
                    $.toast("下车失败!");
                }
            });
        }, function() {
            //取消操作
        });
    }
</script>
</body>
</html>

